package mydesign.chapters01.v2;

import mydesign.chapters01.v2.flybehavior.RocketPower;

public class TestMain {


    public static void main(String[] args) {

        Duck redDuck = new RedDuck();
        redDuck.display();
        redDuck.performFly();
        redDuck.performQuack();


        Duck modelDuck = new ModelDuck();
        modelDuck.display();
        modelDuck.performFly();
        modelDuck.performQuack();
        // TODO: 2021/9/11  给模型鸭装在 火箭动力行为
        modelDuck.setFlyBehavior(new RocketPower());
        modelDuck.performFly();

    }



}
